import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ichinesereader/controller/oauth.dart';

import 'package:ichinesereader/widgets/oauth/link.dart';

class ClassLink extends StatefulWidget {
  @override
  _ClassLinkState createState() => _ClassLinkState();
}

class _ClassLinkState extends State<ClassLink> {
  final OauthController controller = Get.find();
  String? bearcode = Uri.base.queryParameters["bearcode"];

  @override
  Widget build(BuildContext context) {
    controller.callClasslink(bearcode!);
    return Scaffold(
      backgroundColor: Colors.transparent,
      body: Expanded(child: controller.obx((data) {
        return Link(sessionType: 'CLASSLINK');
      })),
    );
  }
}
